﻿/*------------------------------------------------
// File Description: Department DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-02-25 14:04:06
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 
    /// </summary>
    [Table(nameof(Department))]
    public class Department : BaseEntity
    {
        private string _departmentName = string.Empty;

        #region Public Property

        ///<Summary>
        /// 部门名称
        ///</Summary>
        public string DepartmentName
        {
            get { return string.IsNullOrWhiteSpace(_departmentName) ? string.Empty : _departmentName; }
            set { _departmentName = value; }
        }

        ///<Summary>
        /// 父级ID
        ///</Summary>
        public int ParentId { get; set; }

        ///<Summary>
        /// 状态
        ///</Summary>
        public Enum.CommonStatus Status { get; set; }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 
        /// </summary>
        public virtual DbSet<Department> Departments { get; set; }
    }
}